package com.example.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 学生信息 实体类。
 *
 * @author sunfayun
 * @since 2023-10-24
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "学生信息")
@Table(value = "student_info")
public class StudentInfo implements Serializable {

    /**
     * 主键id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "主键id")
    private Long id;

    /**
     * 名字
     */
    @Schema(description = "名字")
    private String name;

    /**
     * 年龄
     */
    @Schema(description = "年龄")
    private Integer age;

    /**
     * 职业
     */
    @Schema(description = "职业")
    private String job;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    @Schema(description = "创建时间")
    private Timestamp createTime;

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    @Schema(description = "修改时间")
    private Timestamp updateTime;

    /**
     * 删除标识
     */
    @Column(isLogicDelete = true)
    @Schema(description = "删除标识")
    private Integer isDeleted;

}
